package com.ybkj.o2o.zhuanche.manager.impl;

import com.ybkj.o2o.zhuanche.entity.OrderStatus;
import com.ybkj.o2o.zhuanche.manager.OrderStatusManager;
import com.ybkj.o2o.zhuanche.service.OrderStatusService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DefaultOrderStatusManager implements OrderStatusManager {
  @Autowired
  private OrderStatusService orderStatusService;

  @Override
  public List<OrderStatus> findByOrderId(Long orderId) {

    return orderStatusService.findByOrderId(orderId);
  }

  @Override
  @Transactional(rollbackFor = Exception.class)
  public void insert(OrderStatus orderStatus) {
    orderStatusService.insert(orderStatus);

  }


}
